package com.zhida84.Servlet;
/**
 * 
 * @author shazhengbo sunchangxing
 *
 */
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.ResultSet;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zhida84.Convert.Base64CodeO;
import com.zhida84.Dao.ShowDetailDao;
import com.zhida84.Dao.UserDao;
import com.zhida84.Impl.ShowDetailImpl;
import com.zhida84.Impl.UserImpl;

/**
 * Servlet implementation class MyWallet
 */
public class addAlipay extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#HttpServlet()
	 */
	public addAlipay() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */
	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */
	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		response.setContentType("text/html;charset=GBK");
		request.setCharacterEncoding("UTF-8");
		try {
			PrintWriter out = response.getWriter();
			int collectionId = Integer.valueOf(request.getParameter("collectionId"));
			ShowDetailDao recDao = new ShowDetailImpl();
			int rs= recDao.delColletionId(collectionId);
			if (rs > 0) {
				out.print("ok");
			} else {
				out.print("error");
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
